SGGetNextFrameReference
TheSGGetNextFrameReference
function allows your channel component to retrieve the sample references you stored by calling theSGAddMovieData
orSGAddFrameReference
function, described on page 6-82 and in the previous section, respectively.
pascal ComponentResult SGGetNextFrameReference (SeqGrabComponent s, SeqGrabFrameInfo *frameInfo, TimeValue *frameDuration, long *frameNumber);
s
- Contains a component instance that identifies the sequence grabber component that has connected to your channel component. The sequence grabber component provides this value to your channel component when it calls your
SGInitChannel
function (described on page 6-36).frameInfo
- Contains a pointer to a frame information structure (defined by the
SeqGrabFrameInfo
data type), which is described on page 6-84. Your component must identify itself to the sequence grabber component by setting theframeChannel
field of this structure to the component instance that identifies the current connection to your channel. The sequence grabber component then returns information about the specified frame in the remaining fields of this structure.frameDuration
- Contains a pointer to a time value. The sequence grabber component calculates the duration of the specified frame and returns that duration in the structure referred to by this parameter. Note that the sequence grabber component cannot calculate the duration of the last frame in a sequence. In this case, the sequence grabber component sets the returned time value to -1.
frameNumber
- Contains a pointer to a long integer. Your channel component specifies the frame number corresponding to the frame about which you want to retrieve information. Frames are numbered starting at 0. However, frame numbers need not start at 0, and they may not be sequential. Set the field referred to by the
frameNumber
parameter to -1 to retrieve information about the first frame in a movie.- The sequence grabber component returns the frame number of the movie's next frame into the field referred to by this parameter. You can use this value the next time you call
SGGetNextFrameReference
.DESCRIPTION
TheSGGetNextFrameReference
function allows your channel component to process these references sequentially or randomly--you specify the relative frame for which you want to retrieve information. The sequence grabber component then retrieves and returns information for that frame. Typically, your channel component calls this function within itsSGWriteSamples
function (described on page 6-41).RESULT CODE
paramErr -50 Invalid parameter specified
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help